---
title: PdfCacheResult
summary: API reference for PdfCacheResult.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-17
library: PdfAPI.Core
reference_type: package
---

# PdfCacheResult

`PdfCacheResult` is the outcome contract for a cache lookup or creation, pairing the original `PdfCacheRequest` with the returned PDF bytes, tracking id, and file path.

## Purpose
- Carries the outcome of a cache lookup or write, including a computed success flag based on whether PDF bytes were returned. ([BR-44](../../business-rules.md#br-44-cache-result-success))

## Context
- Namespace: `PdfAPI.Core.Cache`
- Assembly/package: `PdfAPI.Core`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| PdfCacheResult(PdfCacheRequest) | `PdfCacheResult(PdfCacheRequest request)` | Constructs a result tied to the originating cache request. |
| Request | `PdfCacheRequest Request { get; set; }` | The request that produced this result. |
| TrackingId | `long TrackingId { get; set; }` | The tracking record identifier associated with the cache entry. |
| Pdf | `byte[] Pdf { get; set; }` | The cached PDF bytes, when found or written successfully. |
| FilePath | `string FilePath { get; set; }` | The on-disk path of the cached PDF, when applicable. |
| Message | `string Message { get; set; }` | A human-readable summary of the cache operation's outcome. |
| Success | `bool Success => Pdf != null` | `true` only when `Pdf` is non-null. ([BR-44](../../business-rules.md#br-44-cache-result-success)) |

## Behavioral notes
- `Success` is computed purely from whether `Pdf` is non-null; a non-null `Message` describing an error does not itself affect `Success`. ([BR-44](../../business-rules.md#br-44-cache-result-success))

## Constraints and usage notes
- Check `Success` before reading `Pdf`; a failed lookup leaves `Pdf` null while `Message` may still carry diagnostic text.

## Related documentation
- [Index](../../index.md)
- [Overview](../../overview.md)
- [Architecture](../../architecture.md)
- [Dependencies](../../dependencies.md)
- [Operations and processes](../../operations-processes.md)
- [Business rules](../../business-rules.md)
- [Security and authorization](../../security-authorization.md)
- [API reference](../index.md)

## Sources
- `PdfAPI.Core\Cache\PdfCacheResult.cs`
